// CommonObject.h: interface for the CCommonObject class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_COMMONOBJECT_H__0E6DFD25_3019_11D3_BD77_00C04F9902DF__INCLUDED_)
#define AFX_COMMONOBJECT_H__0E6DFD25_3019_11D3_BD77_00C04F9902DF__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "8085Doc.h"
#include "8085View.h"
#include "8085Object.h"

// contains data that has to be shared by various classes 
//  like CMyAddressListBox,C8085Display
class CCommonObject
{
public:
	CCommonObject();
	virtual ~CCommonObject();

public:
	CDebugData& GetDebugObject();
    inline C8085Object * Get8085Object()
    {
        return GetDocument()->Get8085Object();
    }

    inline CMy8085Doc * GetDocument()
    {
        return m_pDoc;
    }

    inline CMDIChildWnd * GetChildFrame()
    {
        return m_pActiveFrame;
    }

    inline CMy8085View * GetView()
    {
        return m_pView;
    }
    
    inline void SetDocument(CMy8085Doc *pDoc)
    {
        m_pDoc = pDoc;
    }

    inline void SetView(CMy8085View *pView)
    {
        m_pView = pView;
    }

    inline void SetChildFrame(CMDIChildWnd *pChildFrame)
    {
        m_pActiveFrame = pChildFrame;
    }

// data members
protected:
    CMy8085Doc * m_pDoc;
    CMy8085View *m_pView;
    CMDIChildWnd *m_pActiveFrame;
};

#endif // !defined(AFX_COMMONOBJECT_H__0E6DFD25_3019_11D3_BD77_00C04F9902DF__INCLUDED_)
